﻿using ET;
using UnityEngine;

public static class ResourceRequestHelper
{
    public static ETTask<UnityEngine.Object> GetAwaiter(this ResourceRequest self)
    {
        var tcs = ETTask<UnityEngine.Object>.Create(true);
        self.completed += operation => { tcs?.SetResult(self.asset); };
        return tcs;
    }
}
